import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/home',
    children:[
        {path: '/home', component: () => import('../views/home/HomeView.vue')},
        {path: '/study/file', component: () => import('../views/study/StudyFileView.vue')},
        {path: '/study/video', component: () => import('../views/study/StudyVideoView.vue')},
        {path: '/study/category', component: () => import('../views/study/CategoryView.vue')},
        {path: '/notice', component: () => import('../views/notice/NoticeView.vue')},
        {path: '/noticeManage', component: () => import('../views/notice/NoticeView.vue')},
        {path: '/application', component: () => import('../views/properties/ApplicationView.vue')},
        {path: '/management', component: () => import('../views/properties/ManagementView.vue')},
        {path: '/role', component: () => import('../views/role/RoleView.vue')},
        {path: '/emp1', component: () => import('../views/emp/Emp1.vue')},
        {path: '/salary/files', component: () => import('../views/emp/SalaryFiles.vue')},
        {path: '/salary/add', component: () => import('../views/emp/AddSalary.vue')},
        // {path: '/emp2', component: () => import('../views/emp/Emp2.vue')},
        {path: '/emp4', component: () => import('../views/emp/AddSalary.vue')},
        {path: '/manager', component: () => import( '../views/manager/ManagerView.vue')},
        {path: '/editNotice', component: () => import('../views/notice/EditNoticeView.vue')},
        {path: '/noticeDrafts', component: () => import('../views/notice/NoticeDraftsView.vue')},
        {path: '/department', component: () => import( '../views/department/DepartmentView.vue')},
        // {path: '/arrange', component: () => import( '../views/work/ArrangeView.vue')},
        {path: '/attendance', component: () => import( '../views/work/AttendanceView.vue')},
        {path: '/operationLog', component: () => import( '../views/log/OperationLog.vue')},
        {path: '/attendanceApplication', component: () => import( '../views/work/AttendanceApplication.vue')},
        {path: '/workAudit', component: () => import( '../views/Audit/WorkAuditView.vue')},
        {path: '/noticeInfo', component: () => import( '../views/notice/NoticeInfoView.vue')},
        {path: '/logrecord', component: () => import( '../views/log/LogRecord.vue')},
    ]
  },
  {path: '/login', component: () => import('../views/LoginView')},
  {path: '/about', name: 'about', component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')},
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
